<template>
  <van-nav-bar fixed class="header" :title="title">
    <template #left>
      <van-icon
        @click="$router.push('/home')"
        name="wap-home-o"
        size="28"
        color="#999"
      />
    </template>
    <template #right>
      <van-icon
        @click="$router.push('/search')"
        name="search"
        size="28"
        color="#999"
        style="margin-right: 20px"
      />
      <van-icon
        @click="$router.push('/cart')"
        name="shopping-cart-o"
        size="28"
        color="#999"
      />
    </template>
  </van-nav-bar>
</template>

<script>
export default {
  name: 'Header',
  props: {
    title: {
      typeof: String,
      default: '网易严选',
    },
  },
};
</script>

<style lang="less" scoped></style>
